//
//  LoginTextField.m
//  Budejie
//
//  Created by 远成物流 on 2017/6/6.
//  Copyright © 2017年 陈梦佳. All rights reserved.
//

#import "LoginTextField.h"
#import "UITextField+Placeholder.h"

@implementation LoginTextField

-(void)awakeFromNib{
    [super awakeFromNib];
    
    //设置光标颜色为白色
    self.tintColor = [UIColor whiteColor];
    
    //添加监听
    [self addTarget:self action:@selector(textBeginEdit) forControlEvents:UIControlEventEditingDidBegin];
    [self addTarget:self action:@selector(textEndEdit) forControlEvents:UIControlEventEditingDidEnd];
    
    //设置占位文字颜色
    self.placeholderColor = [UIColor redColor];
}

-(void)textBeginEdit{
    self.placeholderColor = [UIColor whiteColor];
}

-(void)textEndEdit{
    self.placeholderColor = [UIColor redColor];
}

@end
